<script type="text/javascript">
$(function(){
	$.get("applicationSingle/getCardInfo",function(data){
		var content="<option value='' selected>请选择</option>";
		var i;
		$(data).each(function(n,item){
			for(i=0;i<item.certificates.length;i++){
				content+="<option value="+item.certificates[i].certificateType+">"
				+item.certificates[i].certificatesName+"</option>"
			}
			$("#agentPapertypeByBlankCard").html(content);
		});
	},"json");
	
	$.post("exchangeCard/getExchangeInfo",function(json){
		if(json.statusCode==DWZ.statusCode.error){
			navTabAjaxDone(json);
			return
		}
		$(json).each(function(n,item){
			$("input[name='citizenCardNo']").val(item.cardNo);
			$("input[name='cardPName']").val(item.Card.cardPName);
			$("input[name='cardTypeName']").val(item.Card.cardTypeName);
			$("input[name='blance']").val(item.blance);
			$("#isRead2").val(item.isRead)
			$("input[name='exchangeCardTime']").val(getDate(item.Card.changeCardDate));
			if(item.isRead==1){//可读设置当前时间
				$("input[name='getCardTime']").val(getDate(Date.now()))
			}else{
				$("input[name='getCardTime']").val(getDate(item.Card.getCardDate));
			}
		})
	},"json")
});

</script>

<div class="pageContent">
	<form id="" method="post" action="" class="required-validate" onsubmit="return validateCallback(this,navTabAjaxDone);">
		<div class="pageFormContent" layoutH="96">
			<fieldset>
			<legend>原卡信息</legend>
			<p>
				<label>卡产品：</label>
				<input  name="cardPName" type="text" size="30" readonly="readonly"/>
			</p>
			<p>
				<label>卡类型：</label>
				<input  name="cardTypeName" type="text" size="30" readonly="readonly"/>
			</p> 
			<p>
				<label>原市民卡号：</label>
				<input name="citizenCardNo"  type="text" size="30" readonly="readonly" />
			</p> 
			  <p>
				<label>换卡日期：</label>
				<input name="exchangeCardTime" type="text" size="30" readonly="readonly"/>
			</p>
			<p>
				<label>领卡日期：</label>
				<input name="getCardTime" type="text" size="30"  readonly="readonly"/>
			</p>
			<p>
				<label>质保期：</label>
				<input name="cardQualityAssurance" type="text" size="30" />
			</p>
			<p>
				<label>是否可读：</label>
				<select id="isRead2" name="isRead"   >
				<option value="0">不可读</option>
				<option value="1">可读</option>
				</select>
			</p>
			<p>
				<label>换卡原因：</label>
				<input name="ChangeCardReason" type="text" size="30"  />
			</p>
			<p>
				<label>电子钱包余额(元)：</label>
				<input name="blance" type="text" size="30"  readonly="readonly"/>
			</p>
			<p>
				<label>换卡卡收费：</label>
				<input name="supplementCardCharge" type="text" size="30" />
			</p>
			</fieldset>
			<fieldset>
			<legend>代理人信息</legend>
			<p>
				<label>代理人证件类型：</label>
				<select id="agentPapertypeByBlankCard" name="agentPapertype" >
					
				</select>
			</p>
			<p>
				<label>代理人证件号码：</label>
				<input type="text" size="30" name="agentPaperNo"/>
			</p>
			<p>
				<label>代理人姓名：</label>
				<input type="text" size="30" name="agentName"/>
			</p>
			<p>
				<label>代理人手机号码：</label>
				<input type="text" size="30" name="agentPhone"/>
			</p>
			</fieldset>
			<p>
				<label>备注：</label>
				<input name="desc" type="text" size="30" />
			</p>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit" >提交</button></div></div></li>
				<li>
					<a class="buttonActive" href="reissueCard/goExchangeCard" target="navTab" rel="exchangeCard" title="换卡"><span>返回</span></a>
				</li>
			</ul>
		</div>
	</form>
</div>
